package com.usian.mycollege.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.usian.common.pojo.ResultVo;
import com.usian.mycollege.pojo.TbCollege;
import com.usian.mycollege.service.CollegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("college")
public class CollegeController {

    @Autowired
    private CollegeService collegeService;

    @RequestMapping("list")
    public ResultVo list() {
        System.out.println("请求了我的college服务");
        List<TbCollege> list = collegeService.list();
        return new ResultVo(200, "success", list);
    }
}
